package com.sm.honkon.ui.fragment.setting

import android.os.Bundle
import androidx.core.os.bundleOf
import com.sm.honkon.R
import com.sm.honkon.app.base.BaseFragment
import com.sm.honkon.app.ext.goBackHome
import com.sm.honkon.app.ext.goMannger
import com.sm.honkon.databinding.FrgMoreBinding
import com.sm.honkon.databinding.FrgSettingBinding
import com.sm.honkon.ui.model.MainViewModel
import me.hgj.jetpackmvvm.ext.nav
import me.hgj.jetpackmvvm.ext.navigateAction

class SettingFragment : BaseFragment<MainViewModel, FrgSettingBinding>() {
    override fun layoutId(): Int = R.layout.frg_setting

    override fun initView(savedInstanceState: Bundle?) {
        mDatabind.click = Click()
    }

    inner class Click{
        fun back(){
            nav().navigateUp()
        }
        fun home(){
            nav().goBackHome()
        }
        fun mannger(){
            nav().goMannger()
        }
        fun exit(){
            System.exit(0)
        }
        fun setting(){
        }
        fun jiaozhunxishu(){
            nav().navigateAction(R.id.action_settingFragment_to_jiaozhunxishuFragment)
        }
        fun xitong_gengxin(){
            nav().navigateAction(R.id.action_settingFragment_to_systemAndUpdateFragment)
        }
        fun guanyubenji(){
            nav().navigateAction(R.id.action_settingFragment_to_mySettingInfoFragment)
        }
        fun yonghu_weihu(){
            nav().navigateAction(R.id.weihuFragment)
        }
        fun huifuchuchang(){
            nav().navigateAction(R.id.resetSettingFragment)
        }
    }
}